var server = require('../server')
var db = require('../../db/connect')
var jsonres = require('../../libs/jsonres')

server.get('/api/matchs',function(req,res) {
    var roundid = req.query.roundid
    var u = req.query.user
    var p = req.query.platform
    db.find('matchdatas',{platform: p, 'userinfo.userid': u, roundid: roundid },function(err,result) {
        if (!!!err) {
            res.send(jsonres(200,'success',result))
        } else {
            res.send(jsonres(-1,'查询失败',err))
        }
    })
})
